home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Joint Education Initiative
/
Joint Education Initiative.iso
/
dos
/
user_doc
/
pcmips.man
< prev
next >
Wrap
Text File
|
1990-04-19
|
57KB
|
1,585 lines
Draft version of
PC-MIPS User Manual
as of 04/19/90
PC-MIPS User Manual
Table of Contents
PC-MIPS Overview . . . . . . . . . . . . . . . . . . . 1
Installing PC-MIPS . . . . . . . . . . . . . . . . . . 5
User Interface . . . . . . . . . . . . . . . . . . . . 5
Image Data Structure . . . . . . . . . . . . . . . . . . 6
User Input . . . . . . . . . . . . . . . . . . . . . . 7
PC-MIPS Programs
CMBIMG . . . . . . . . . . . . . . . . . . . . . . . . 8
DERIV . . . . . . . . . . . . . . . . . . . . . . . . 8
EDGENH . . . . . . . . . . . . . . . . . . . . . . . . 9
EXT_ROI . . . . . . . . . . . . . . . . . . . . . . . . 10
FLT8B . . . . . . . . . . . . . . . . . . . . . . . . *
IMDISP . . . . . . . . . . . . . . . . . . . . . . . . 10
LIST . . . . . . . . . . . . . . . . . . . . . . . . 10
MAPIMG . . . . . . . . . . . . . . . . . . . . . . . . 11
MAPLN1 . . . . . . . . . . . . . . . . . . . . . . . . 12
MDGRAD . . . . . . . . . . . . . . . . . . . . . . . . 13
MEDIAN . . . . . . . . . . . . . . . . . . . . . . . . 13
MIXBDS . . . . . . . . . . . . . . . . . . . . . . . . *
NUVU . . . . . . . . . . . . . . . . . . . . . . . . *
OVRLAY . . . . . . . . . . . . . . . . . . . . . . . . 14
PCA . . . . . . . . . . . . . . . . . . . . . . . . *
PICSTR . . . . . . . . . . . . . . . . . . . . . . . . *
RADARS . . . . . . . . . . . . . . . . . . . . . . . . *
RATIO . . . . . . . . . . . . . . . . . . . . . . . . 16
ROI . . . . . . . . . . . . . . . . . . . . . . . . 17
ROTATE . . . . . . . . . . . . . . . . . . . . . . . . 17
SALTP . . . . . . . . . . . . . . . . . . . . . . . . 18
SCALE . . . . . . . . . . . . . . . . . . . . . . . . *
SHAD2 . . . . . . . . . . . . . . . . . . . . . . . . 19
SHADRF . . . . . . . . . . . . . . . . . . . . . . . . *
STATS . . . . . . . . . . . . . . . . . . . . . . . . *
STEEP . . . . . . . . . . . . . . . . . . . . . . . . *
STENCL . . . . . . . . . . . . . . . . . . . . . . . . *
STRTCH . . . . . . . . . . . . . . . . . . . . . . . . 20
SUBIMG . . . . . . . . . . . . . . . . . . . . . . . . 21
SUN . . . . . . . . . . . . . . . . . . . . . . . . *
WTCMBO . . . . . . . . . . . . . . . . . . . . . . . . 21
* - program write-up, as yet, not completed.
PC-MIPS User Manual
PC-MIPS Overview
Historically, the processing and analysis of GLORIA side-
scan sonar data within the U.S. Geological Survey has been done
on DEC mini-computers using the MIPS software system. Due to the
volume of work generated by the EEZ sea-floor mapping program,
these systems have not been readily available to a large group of
marine scientists who would like to perform investigations that
require image analysis capabilities. At the same time, the
availability and use of very powerful PCs has significantly
increased. Recently, the processed GLORIA imagery has been made
available on Compact Disks (CDROM) which can be accessed by PCs.
These factors make a PC-based MIPS-like system highly desirable.
The PC-MIPS system is an attempt to satisfy this need.
PC-MIPS is an integrated collection of programs which have
been adapted to a PC environment. Most of these programs have
been selected from the MIPS software system developed at the USGS
Image Processing Facility in Flagstaff, Arizona. While internal
program and data structures have been extensively modified, an
attempt has been made to preserve the basic appearance to the
experienced MIPS user.
PC-MIPS was developed using MS-DOS version 3.31 for the
Compaq Deskpro. Microsoft's Fortran version 5.0 was chosen as
the development language since about half of the MIPS system was
written in Fortran (the other half being in the MAC assembler
language).
The selection of a display mechanism has largely been based
on the availability of existing PC-based software. During the
early stages of the GLORIA CD-ROM project, an image display
program (IMDISP) developed by NASA at the Jet Propulsion Lab was
evaluated and found to be excellent for displaying GLORIA images
on a PC. IMDISP supports all the major graphics standards (i.e.,
CGA, EGA, VGA, and PGA). It provides an extensive set of
commands and utilizes a very simple but robust set of file
structures.
The hardware utilized for the development of PC-MIPS is a
Compaq 386/20 Model 130 equipped with 2Mb ram, the 80387/20 math
coprocessor and a VGA color monitor. This configuration provides
processing speeds which average 26Kb per second. In other words,
if you process an input image 1Mb in size and create a resultant
output image of the same size, the processing time will usually
be under 1.5 minutes.
Standard VGA provides a display of 16 colors and/or grey
levels with a resolution of 640 by 480 pixels. A display of 64
grey levels can be achieved using the Orchid ProDesigner PLUS VGA
card with 512K on-board memory.
The hardware configuration which was used for development is
recommended for use; however, PC-MIPS will run under MS-DOS on
1
PC-MIPS User Manual
any generic PC/AT class machine with VGA graphics, and a hard
disk. The software itself occupies approximately 2.6Mb.
Realistically, a hard disk of at least 40Mb should be used.
Following is a list of the programs currently available:
CMBIMG Combines from 2 - 4 input images to create a composite
output image which can be displayed via IMDISP.
DERIV Generates the first differences in the horizontal,
vertical, or diagonal direction.
EDGENH Uses a Laplacian transform to provide edge enhancement
capabilities.
EXT_ROI Used to extract an irregularly shaped sub-image
(defined in POLYGON.DAT) from up to 7 input images.
FLT8B Boxcar spatial filtering (powerful workhorse; high and
low pass filtering; surface generation; interpolation
for gaps; edge enhancement; etc.).
IMDISP JPL's image display program. Currently 18 commands
are implemented. Among them are Profile, Stretch,
Palette, Histogram, Browse, and Display with or
without sub-sampling and/or zoom. Text may, also, be
positioned on the display.
LIST Generates a printout (LIST.PRT) of DN values for an
image. Sub-image areas may be specified.
MAPIMG Performs a user-specified mapping of 1 to 7 input
files. An extremely robust program that generates an
output image which is the result of a user-specified
functional mapping applied to the input files.
MAPLN1 Enhances linear features using a semi-linear line
detecting/mapping technique (useful for regular image
data as well as Topo, Gravity, etc.).
MDGRAD Modified gradient method that instead of multiplying
the constants together adds them because of the
possibility of one of them being ZERO (linear feature
enhancement/mapping technique; used on image and
surface data such as TOPO).
MEDIAN Applies a 3 by 3 median (middle value) filter. Will
help remove high frequency noise. MEDIAN is
particularly suitable for data that has a skewed
distribution. However, the value obtained for the
median may not be representative if the individual
items do not tend to cluster at the center of the
distribution.
2
PC-MIPS User Manual
MIXBDS Will generate three output bands from the TM six bands
by selecting the user-specified three optimum bands
for each of vegetation, soils, and water. For example,
vegetation pixels might have TM bands 2,4, and 5;
soils pixels might have TM bands 1,4, and 5; while
water pixels might have TM bands 1,2, and 3. This
will allow the three output bands to be used for
either color compositing or digital processing so that
these three 'new' bands have the best combination for
these three major cover types.
NUVU Creates oblique views of image data using a
Topographic height file and/or image file. If only
the image file is used, the DN value is interpreted as
height.
OVRLAY Takes from 2 to 6 input files/images and generates one
output file/image that indicates which of the input
files have data in user specified ranges for the input
files being used.
PCA Generates the linear combinations for Principal
Component Analysis of two to seven files (the output
of STATS may be used as input coefficients).
PICSTR This program allows the user to let the machine pick
good stretch pairs for an image based on either min/
max parameters or by giving a min/max percent of the
image. Values outside these ranges are ignored when
trying to pick DN values.
RADARS Uses digital elevation data as input (dma, dem, etc.)
and outputs the elevation data with it's geometry
converted to slant range mode. The user specifies the
near range (nr) depression angle (used to determine nr
to nadir distance) and the imaging system's height and
pixel resolution. It assumes the radar scan direction
is in the horizontal direction (i.e., the imaging
system is on the left or right side of the image).
RATIO Generates up to three output images that are the
result of dividing the up to four input images by each
other.
ROI Used to define and extract an irregularly shaped sub-
image from up to 7 input images. Requires VGA and
serial MS compatible mouse.
ROTATE Rotates an image 90 degrees in the clockwise or
counter-clockwise direction.
SALTP Does bit error or random noise removal (Salt and
Pepper).
3
PC-MIPS User Manual
SCALE Changes the scale of an image in the line direction,
sample direction, or both.
SHAD2 Does automatic shading correction on Sonar, Radar, or
any other file.
SHADRF Computes reflectance for any sun elevation and one of
four sun directions using Lommel-Seeliger Law.
STATS Computes the Mean, Standard Deviation, Variance,
Covariance, and Correlation Coefficients between two
to seven images. It will also create the eigen vector
matrix that is required as input to PCA.
STEEP Uses surface data as input (dem, dma, gravity, etc.)
and generates a thematic map (0's or 255's) of ridges
or drainage patterns (i.e., maps linear features).
STENCL Uses two input files. The first file is 'stenciled'
based on data of second file. Generates one output
file.
STRTCH Performs contrast stretching on an image using up to
10 user-specified stretch intervals.
SUBIMG Allows the extraction and/or "flipping" (i.e.,
reversing) of sub-images in the line and/or sample
direction.
SUN Computes reflectance given any sun elevation and
direction.
WTCMBO Generates the weighted sum of 1 to 4 input files. The
weighting coefficients are specified by the user and
must be real numbers. The DN values for the output
file are computed as follows:
OUT = C1*INPUT1 + C2*INPUT2 + C3*INPUT3 + C4*INPUT4 +
C5
Where C1, C2, C3, C4, and C5 are user-specified
constants.
4
PC-MIPS User Manual
Installing PC-MIPS
PC-MIPS can be installed on any hard disk drive (e.g., C:,
D:, E:,,,etc.). Once a drive is selected, the installer should
create a root-level directory named \MIPS. Next, the two sub-
directories \MIPS\BIN and \MIPS\AUX_FILE must be created. These
directories are created using the DOS command MKDIR or MD. The
executable programs of PC-MIPS are stored in the \MIPS\BIN
directory. The \MIPS\AUX_FILE directory contains various
auxiliary files used by PC-MIPS programs.
Two 1.2Mb floppy disks contain three programs which are used
to load the \MIPS sub-directories. These programs are named
AUX_LOAD.EXE, BIN_LD1.EXE, and BIN_LD2.EXE (they were created
using the program PKSFX from PKWARE INC., 7032 Ardara Ave.,
Glendale, WI 53209). The installer should first load the
AUX_FILE sub-directory by typing A:AUX_LOAD \MIPS\AUX_FILE.
Next, the BIN sub-directory is partially loaded by typing
A:BIN_LD1 \MIPS\BIN. The installation is completed by inserting
the second floppy disk and typing A:BIN_LD2 \MIPS\BIN. These
steps can be performed automatically by executing the INSTALL.BAT
files found on each floppy disk. They assume installation on
hard disk drive C:.
Once the two floppy disks have been loaded, the AUTOEXEC.BAT
file should be changed so that the display program IMDISP knows
what display device is being used. This is done by setting the
environmental variable IMDISP. For instance, if the hardware has
standard VGA capabilities, the line SET IMDISP=VGA must be added
to the AUTOEXEC.BAT file. A complete list of devices supported
by IMDISP can be found in the file IMDISP.DOC.
PC-MIPS can now be executed by typing \MIPS\BIN\PC_MIPS. If
\MIPS\BIN is added to the DOS PATH command in the AUTOEXEC.BAT
file, the system can be run by simply typing PC_MIPS.
User Interface
Individual PC-MIPS programs can be executed directly or via
a menu-driven interface. A menu-driven interface presents the
user with a list of the PC-MIPS programs available for use and
provides a mechanism for selecting and executing individual
entries. Individual programs in the list may be selected by name
or number. PC_MIPS, also, provides a gateway which allows
execution of DOS commands without exiting the system. This
gateway is entered by typing DOS at the user prompt. After the
gateway is entered, the user returns to the menu by typing
PC_MIPS in response to the DOS> prompt.
5
PC-MIPS User Manual
Image Data Structure
The PC-MIPS image data structure is a subset of JPL's PDS
data structure (see IMDISP.DOC). This subset has the following
restrictions:
1. Only 8 bit data is supported.
2. The image definition must be contained in a separate
image label file.
3. Image header records are not supported.
4. Line prefix and suffix bytes are not supported.
A PC-MIPS image is composed of two files. The first is an
image label file and the second is an image data file.
Image label files contain information describing the image
such as the number of lines, the number of samples, and the
location (path name) of the image data file. Records of the
image label file contain keywords and values. The mandatory
keywords are FILE_TYPE, IMAGE_LINES, LINE_SAMPLES, IMAGE_POINTER,
and END. These are described as follows:
FILE_TYPE - Must have the value IMAGE.
IMAGE_LINES - Gives the number of lines (i.e., rows) in the
image.
LINE_SAMPLES - Gives the number of samples (i.e., columns) per
line.
IMAGE_POINTER - Gives the path name of the image data file.
END - Must be the last record of a label file.
If the PDS keyword LINE_PREFIX_BYTES is given, its value will be
added to the LINE_SAMPLES value. The following image label file
named SAMPLE defines an image of 460 lines and 407 samples:
FILE_TYPE = IMAGE
IMAGE_LINES = 460
LINE_SAMPLES = 407
IMAGE_POINTER= \images\sample.img
END
The image data file is binary (i.e., non-printable) and
contains the DN values which comprise the image. This file MUST
be IMAGE_LINES times LINE_SAMPLES bytes in size. It is simply a
contiguous sequence of bytes (i.e., DN values) which represent
the image stored in row (i.e., line) major order.
While running PC-MIPS programs, the user refers to an image
using the image label file name. THIS FILE NAME SHOULD NOT HAVE
A DOS EXTENSION (i.e., not contain a period). A PC-MIPS output
image will be composed of the user-specified image label file
name and an image data file whose name is the same but has .IMG
as a DOS extension.
6
PC-MIPS User Manual
User Input
PC-MIPS has two types of user input. The first type is file
names (input and/or output). The second type is parameters that
control the computation.
File names are entered by the user at the FILES> prompt.
The user responds by entering a list of output names, followed by
an equal sign, followed by a list of input names. Individual
elements (file names) in these lists are separated by commas.
File names may not have extensions (i.e., may not contain a
period) and full DOS path names may be used. For example,
FILES>OUT1,OUT2=INPUT1,INPUT2,INPUT3 represents lists of two
output files (OUT1 and OUT2) and three input files (INPUT1,
INPUT2, and INPUT3). For programs that generate no output files,
the user only enters the list of input files. If an input file
does not exist, the user is informed and requested to reenter the
FILES> line. If an output file already exists, the user is asked
if this file should be over-written. Prior to the FILES> prompt
the user is informed of the expected number of file names and the
maximum number of samples per line that is permitted. All input
files must be of the same size (i.e., contain the same number of
lines and samples).
The input of program parameters is given by the user at the
PARAM> prompt. Prior to issuing the PARAM> prompt, the program
displays the valid parameter names, their default values
(enclosed in brackets), and their meaning. Parameters are
assigned values by entering their name, followed by the equal
sign, followed by a value. Values may be numeric constants or
character strings. Character strings must be enclosed in
apostrophes. Some parameters are set by simply entering their
name (i.e., without the equal sign followed by a value). An
example would be the specification of which type of computation
is desired. Commas are used to separate the setting of multiple
parameters. For example, the valid parameters for the LIST
program are SS, SL, ES, EL, LINC, SINC, PAGE, and HEAD. If the
user entered the line SS=200, EL=200, PAGE, HEAD='1st 200'
he would be requesting a single page listing of the first 200
lines and samples with the title '1st 200'.
7
PC-MIPS User Manual
PC-MIPS Programs
CMBIMG
This program is used to create an output file composed of
multiple images which can be viewed using the IMDISP program.
CMBIMG prompts for the input/output file specifications in normal
PC-MIPS form (i.e., OUTPUT=INPUT1,INPUT2,INPUT3,INPUT4). There
may be from two to four input images and the size (number of
lines and samples) of all input images MUST be equal.
The composite output image (i.e., file) is structured as
shown below:
------ ------
|INPUT1|INPUT2|
OUTPUT= |------|------|
|INPUT3|INPUT4|
------ ------
hint:
An output file of more than four input images can be created by
repeated use of CMBIMG.
Example:
CMBIMG 18-MAY-88 # of files
bit types: 8 2 - 4 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File name(s) that has (have) the input data to be processed.
=INPUT1,INPUT2,INPUT3)
------ ------
|INPUT1|INPUT2|
OUTPUT= |------|------|
|INPUT3|INPUT4|
------ ------
FILES> comb=sample,m1,m2
FILES>
Do you want to display comb (y/n)? n
DERIV
Program DERIV performs a derivative (or first difference)
function on an image. The derivative can be in the horizontal,
vertical, or diagonal direction as specified by the user. The
equations used are:
horizontal - Y(i,j) = X(i,j) - X(i+1,j) + C
vertical - Y(i,j) = X(i,j) - X(i,j+1) + C
diagonal - Y(i,j) = X(i,j) - X(i+1,j+1) + C
8
PC-MIPS User Manual
where X is the input image, Y is the output image, and C is a
user-specified constant.
The user enters the input/output file names at the FILES>
prompt. The program then displays the four valid parameters and
issues a PARAM> prompt. The desired direction is selected
entering one of the three directional parameters HORZ, VERT, or
DIAG. The fourth parameter IADB is provided as an add-back
constant which defaults to 127 if not specified.
Example:
DERIVE 12-JAN-85 # of files
bit types: 8 1 input
max samples: 3000 1 output
Filename where the processed results will be stored.
(e.g., OUTPUT
Filename that has the input data to be processed.
=INPUT)
FILES> hdrev=sample
Valid parameters are:
HORZ:[] - Performs a horizontal derivative
VERT:[] - Performs a vertical derivative
DIAG:[] - Performs a diagonal derivative
IADB:[127] - Addback constant
(e.g., HORZ,IADB=127)
PARAM> horz, iadb=100
FILES>
Do you want to display hderv (y/n)? n
EDGENH
EDGENH uses a Laplace transform to perform edge enhancement
on images. The transform matrix is as follows:
0 -1 0
-1 4 -1
0 -1 0
The user is prompted for input/output file names via the
FILES> prompt. Next, the user is prompted to enter a value
representing the fraction of the Laplace transform to be added.
Each interior pixel Y(i,j) is calculated according to the formula
Y(i,j)=X(i,j)+f*[4*X(i,j)-X(i-1,j)-X(i,j-1)-X(i+1,j)-X(i,j+1)]
where X is the input image, Y is the output image and f is the
user-specified fraction. Boundary pixels are unchanged.
Example:
EDGENH 18-JUNE-88 # of files
bit types: 8 1 input
9
PC-MIPS User Manual
max samples: 3000 1 output
File name where the results are to be stored
(e.g., OUTPUT
File name where the input data is located
= INPUT)
FILES> edge = sample
Enter fraction of Laplace transform to be added: 0.4
FILES>
Do you want to display edge (y/n)? n
EXT_ROI
This program extracts sub-images from up to 7 input images.
The sub-image is specified by an ascii file named POLYGON.DAT
which contains the polygon vertices which define the sub-image.
The first record in this file contains the number of vertices.
Subsequent records contain the vertices themselves. They are
given as sample/row pairs. This file must be present in the
working directory when the program is executed. Output and input
file names are given by the user at the FILES> prompt.
IMDISP
Refer to IMDISP.DOC file for description.
LIST
This program will generate a printout of DN values. The
user can select a window by specifying starting/ending line and
sample numbers. Additionally, line and sample increments may be
given. If a single-page printout is requested, the program
automatically determines the line and sample increments which
will achieve this result.
The name of the image to be listed is specified on the
FILES> prompt line. The desired listing parameters are specified
on the PARAM> prompt line. The parameters which may be specified
are as follows:
SS:[1] - Starting sample number
SL:[1] - Starting line number
ES:[NS] - Ending sample number
EL:[NL] - Ending line number
SINC:[1] - Sample increment
LINC:[1] - Line increment
PAGE:[] - List total area on one page
HEAD:[] - Label to be put on top of printout
Note that default values are indicated within the square
brackets. As an example, SS=10, LINC=5, HEAD='SAMPLE LISTING'
10
PC-MIPS User Manual
would generate a listing of every fifth line and all samples
after the first nine. The listing would be titled 'SAMPLE
LISTING'.
The output file which contains the listed DN values is
named LIST.PRT. Sample numbers are given along the top of pages
and line numbers are given down the first column of pages. Each
page contains 50 lines and 25 samples. Multiple pages are
generated until the entire specified area is represented.
Example:
LIST 9-AUG-84 # of files
bit types: 8 1 input
max samples: 8000 0 output
File name that has the input data to be processed.
FILES> sample
Valid parameters are:
SS:[1] -Starting sample
SL:[1] -Starting line
ES:[NS] -Ending sample (defaults to the number of samples in the
input file)
EL:[NL] -Ending line (defaults to the number of lines in the
input file)
LINC:[1] -Line increment
SINC:[1] -Sample increment
PAGE:[] -List total area on one page.
HEAD:[] -Label to be put on top of listing.
(e.g., LINC=1,SINC=1,PAGE, HEAD='LABEL')
PARAM> ss=151, es=200, sl=201, el=300, sinc=2
FILES>
MAPIMG
MAPIMG provides the ability to create an output image which
is computed by a user-specified mapping of from 1 to 7 input
images. The mapping is done on a pixel-by-pixel basis.
The user first specifies the output and input image file
names in the normal PC-MIPS format (e.g. out=in1,in2,in3).
Next, the user specifies the mapping by entering a mathematical
expression which defines the desired mapping.
This expression may contain numeric constants, arithmetic
operators (+, -, /, *, and **), input image identifiers F1 to
F7 which refer to the corresponding input images, and intrinsic
functions. Parenthesis may be used to control the order of
evaluation.
The intrinsic functions supported are as follows:
11
PC-MIPS User Manual
Function Returns
-------- -------
abs() Absolute value
sqrt() Square root
log() Base 10 logarithm
ten() Power of 10
int() Integer truncation
sin() Trigonometric sine
cos() '' cosine
max() Maximum pixel value
min() Minimum pixel value
rand() Pseudo-random value in the range 0.0 to 1.0
All functions take a mathematical expression as an argument.
This argument is evaluated prior to evaluating the function. For
the max(), min(), and mean() functions, the evaluated argument is
considered an integer which represents the number of input images
to be considered. The sin() and cos() functions assume their
argument to represent degrees. The rand() function assumes its
argument to be a non-zero seed (or starting value) to be used in
generating the random numbers.
Example:
MAPIMG 10-MAY-88 # of files
bit types: 8 1 - 7 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File name(s) that has (have) the input data to be processed.
=INPUT1,INPUT2,INPUT3)
FILES> map1 = sample, m1, m2
Enter mapping as a function of the input files F1 - F7
(i.e. 0.33*(F1+F2+F3) or (F1+F2)/F3+127 )
MAPPING> (f1 + 0.5*(max(3) - min(3)) + f2 + f3)/3
FILES>
Do you want to display map1 (y/n)? n
MAPLN1
MAPLN1 enhances linear features using a semi-linear line
detecting/mapping technique. The semi-linear technique is one
proposed by G. J. Vanderbrug (1975) and is a compromise between
linear and nonlinear detectors. It makes separate comparisons to
the left and to the right so it does not respond to edges but
will respond to isolated noise. For more information see Bureau
of Mines report on automatic linear feature mapping by Chavez
(1983).
The only user input is the input/output file names at the
FILES> prompt.
12
PC-MIPS User Manual
Example:
MAPLN1 24-JAN-85 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File name that has the input data to be processed.
=INPUT)
FILES> linout = sample
FILES>
Do you want to display linout (y/n)? n
MDGRAD
This program uses a modified gradient method for linear
feature enhancement/mapping, but instead of multiplying the
constants A, B, C, and D together they are added. The reason for
this is that if only one of them is zero, no information is seen
and the computation is faster.
The formulas used are:
A = |X(i+2,j+1)-X(i+3,j+2)| + |X(i+2,j+2)-X(i+3,j+1)|
B = |X(i+1, j )-X(i+4,j+3)| + |X(i+1,j+3)-X(i+4, j )|
C = |X(i+2, j )-X(i+3,j+3)| + |X(i+1,j+2)-X(i+4,j+1)|
D = |X(i+3, j )-X(i+2,j+3)| + |X(i+1,j+1)-X(i+4,j+2)|
Y(i,j) = A + B + C + D
where X is the input image and Y is the output image.
The only user input is the input/output file names at the
FILES> prompt.
Example:
MDGRAD 21-AUG-84 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File name that has the input data to be processed.
=INPUT)
FILES> mdout = sample
FILES>
Do you want to display mdout (y/n)? n
MEDIAN
This program applies a 3 x 3 median filter to an image. It
will smooth the data in a slightly different manner than that
done by a simple average. The median is equal to the middle item
13
PC-MIPS User Manual
in a distribution which has been arranged by increasing value.
Therefore the median location is equal to the pixel in the exact
center and its DN value is assigned to the output pixel.
Output and input file names are specified on the FILES>
prompt line. There are no other program parameters to be
entered.
Example:
MEDIAN 31-MAY-85 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the results are to be stored
(e.g., OUTPUT
File name where the input data is located
= INPUT)
FILES> m1=sample
FILES>
Do you want to display m1 (y/n)? n
OVRLAY
OVRLAY takes from 2 to 6 input images and generates one
output image that indicates which of the input images have data
in user specified ranges for the input images being used.
This program can be used as part of an IMAGE or GIS
processing system. In the GIS mode it can be used to overlay and
merge various data sets together and in the IMAGE processing mode
as a quick parallelepiped classifier. Currently there is a limit
of six input files, but more can be processed by executing the
program twice on two different groups of input files and then
executing it a third time using the results of the first two
groups as input. But this will be good ONLY to map where the
data is in given ranges for ALL the input files used. The range
of the third image results will be 0 to 3, where 3 indicates
where the data is in the given ranges for all the files used.
The program uses the MIN and MAX values for each input file
supplied by the user to create a look-up table (ITBLA) indexed by
the DN values of the input data. The values assigned to ITBLA
are either 1 or 2 (1 implies DN value outside range and 2 implies
DN value inside MIN-MAX range). This is like stretching all data
outside the given range to 1 and inside the range to 2.
The values (1 or 2) in this table (ITBLA) are then used to
index into a second table (ITBLB) which has the correct sum or DN
value for the given input file ranges. The values in the second
table (ITBLB) are computed as if the input files were summed
after they were given the values of 0 and 1,2,4,8,16, or 32
according to the data being outside (0) or inside (FILE1=1,
FILE2=2, FILE3=4, FILE4=8, FILE5=16, and FILE6=32) the specified
14
PC-MIPS User Manual
ranges. The data range of the output image will be from zero to
(2**NFILES-1) where NFILES = number of input files used (2 to 6).
In the case of four input files, the following table (where
YES indicates value of given input file is in specified range)
gives the value of the output file for possible combinations of
input values:
INPUT INPUT INPUT INPUT OUTPUT
FILE1 FILE2 FILE3 FILE4 DN
----- ----- ----- ----- ------
NO NO NO NO 0
YES NO NO NO 1
NO YES NO NO 2
YES YES NO NO 3
NO NO YES NO 4
YES NO YES NO 5
NO YES YES NO 6
YES YES YES NO 7
NO NO NO YES 8
YES NO NO YES 9
NO YES NO YES 10
YES YES NO YES 11
NO NO YES YES 12
YES NO YES YES 13
NO YES YES YES 14
YES YES YES YES 15
These values may be summarized as follows:
0 = All 4 files NO
1,2,4,8 = Only 1 file YES
3,5,6,9,10,12 = 2 files YES
7,11,13,14 = 3 files YES
15 = All 4 files YES
Example:
OVRLAY 3-MAY-84 # of files
bit types: 8 2 - 6 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File names that have the input data to be processed.
=INPUT1,INPUT2,INPUT3)
FILES> overlay = sample, bathy, dpth
Valid parameters are:
MIN* = Minimum value for FILE(1-6)
MAX* = Maximum value for FILE(1-6)
* .. Replace with the file number.
There are no default values.
Values for MIN* and MAX* must be between 0 and 255.
(e.g., MIN1=5,MAX1=70,MIN2=22,MAX2=33,MIN3=0,MAX3=96)
15
PC-MIPS User Manual
PARAM> min1=3,max1=240, min2=5,max2=170, min3=10,max3=210
FILES>
Do you want to display overlay (y/n)? n
RATIO
This program is used to generate output images which are
ratios of input images. Up to four input images and three output
images may be specified.
The names of the output and input images are specified on
the FILES> prompt line. The program then requests ratio
parameters on the PARAMS> prompt line. The parameters which may
be specified are as follows:
R1 - A two digit number specifying how the first output
image is to be calculated. The first digit gives the
number of the input file which is to be used as the
numerator. The second digit gives the number of the
input file which is to be used as the denominator. For
example R1=13, specifies that the first output image is
the ratio of the first and third input images.
R2 - Same as R1, but for the second output image.
R3 - Same as R1, but for the third output image.
FACT - A value which is to be used as a multiplication factor.
The default value is 1.
Example:
RATIO 28-SEP-83 # of files
bit types: 8 2 - 4 input
max samples: 3000 1 - 3 output
File names where the processed results will be stored (1-3
images).
(e.g., OUTPUT
File names that have the input data to be processed (2-4 images).
= INPUT1,INPUT2)
FILES> band17,band24=band1,band2,band4,band7
Valid parameters are:
R1:[] -First ratio
R2:[] -Second ratio
R3:[] -Third ratio
FACT:[1.0]-Ratio multiplying factor
(e.g.,R1=12,R2=13,FACT=1.2)
R1=12 means that the 1'st ratio will be input file 1 divided by
file 2
R2=13 means that the 2'nd ratio will be input file 1 divided by
file 3
R3=23 means that the 3'rd ratio will be input file 2 divided by
file 3
16
PC-MIPS User Manual
PARAM> r1=14, r2=23
FILES>
Do you want to display band17 (y/n)? n
ROI
This program requires VGA graphics capability and a serial
MS-compatible mouse. It allows the user to delineate a sub-image
which is extracted from up to 7 input images. The sub-image is
determined by entering polygon vertices using a mouse.
At the FILES> prompt the user enters output and input file
names. The first input file is displayed up to a maximum of 480
lines and 640 samples. Next, the user positions the graphics
cursor (an arrow) to an initial vertex and "clicks" on that point
by pressing the leftmost mouse button. That point is illuminated
and the user moves to the second vertex and "clicks" on it using
the same button. A line is drawn connecting the two points. The
remaining vertices, up to the last, are specified in the same
manner. When the cursor has been positioned on the last vertex,
the polygon is closed by "clicking" with the second mouse button.
After the polygon has been entered, the program creates the
specified sub-image from each of the input files and creates an
ascii file named POLYGON.DAT which contains the polygon vertices
in a format acceptable to EXT_ROI which can be executed if sub-
images from additional files are desired.
ROTATE
This program rotates an image 90 degrees (i.e., interchanges
lines and samples) in the clockwise or counter-clockwise
direction. The user specifies output and input file names on the
FILES> prompt line. The program, then, requests the direction of
rotation. Entering 0 (zero) indicates clockwise and 1 (one)
indicates counter-clockwise.
If the input image is small enough to reside in the
available computer memory, the execution is very fast. For
larger images, each pixel must be accessed individually and the
execution time is quite slow. If this situation exists, a
warning is given.
Example:
ROTATE 18-OCT-88 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the results are to be stored
(e.g., OUTPUT
File name where the input data is located
17
PC-MIPS User Manual
= INPUT)
FILES> r1=m1
Enter 0 for clockwise or 1 for counter-clockwise: 0
FILES>
Do you want to display r1 (y/n)? n
SALTP
This program is used to remove bit errors from images. The
removal is based on a DN tolerance value which may be specified
by the user or determined automatically based on the image
histogram.
A 3-line by 5-sample box is moved from left to right and
from top to bottom through the input image to remove bad pixels
from the image. This box is illustrated below:
---- ---- ---- ---- ----
| U1 | U2 | U3 | U4 | U5 |
---- ---- ---- ---- ----
| M1 | M2 | M3 | M4 | M5 |
---- ---- ---- ---- ----
| L1 | L2 | L3 | L4 | L5 |
---- ---- ---- ---- ----
Each time the box is moved, the pixel element in the middle (M3)
of the box is compared with averages of other pixels inside the
box to determine if the pixel needs to be replaced. This is done
in two steps. Step 1 finds the average of the two points at the
upper left corner of the box (U1 and U2) and the average of the
two points at the lower right hand corner of the box (L4 and L5).
If the difference of the two averages is greater than four times
the tolerance limit then the box is currently over an edge in the
image. If the edge test succeeds (box is over an edge) then the
pixel in the middle cannot be corrected. If the edge test fails
then step 2 is performed. Step 2 finds the average of the line
above (U1-U5) and the line below (L1-L5) the line containing the
pixel to be corrected. If the difference of the point in the
middle and the average is greater than the acceptable tolerance
then the point is considered bad data and is replaced with the
average of the box.
Example:
SALTP 21-DEC-84 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File name that has the input data to be processed.
=INPUT)
FILES> cleaned = sample
Valid parameters are:
18
PC-MIPS User Manual
TOL:[] - Integer DN tolerance value to be used to identify
pixels that have a bit error. If not specified,
TOL is calculated based on the histogram.
PARAM> tol = 11
TOLERANCE= 11 Percentage of pixels changed = 25.8
FILES>
Do you want to display cleaned (y/n)? n
SHAD2
SHAD2 computes the average of each sample position using
every other line. The computed averages are then normalized by
either the average value of all the averages or by a user
supplied DN value (e.g., NORM). It can be used to correct for
shading problems that exist in the horizontal direction (e.g., on
sonar or radar data).
SHAD2 uses the normalized average values as shading
coefficients for image shading corrections. The user specifies
values of TOL1 and TOL2 which are used to compute the average
values using only data greater than or equal to TOL1 and less
than or equal to TOL2. It passes through the input data twice,
once to compute the correction coefficients and the second time
to apply them. The user may specify a beginning sample number
(e.g., ISS) for the computation.
The user-specified keywords are as follows:
TOL1:[0] - Lower DN limit tolerance to be used to compute
averages.
TOL2:[maxdn] - High DN limit tolerance to be to compute averages.
ISS:[1] - Starting sample user wants to start processing the
input data. Output lines will still contain all
samples.
NORM:[ave] - DN values to be used to normalize all the
averages. Default is the average of all the
averages.
Example:
SHAD2 27-APR-84 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT
File name that has input data to be processed.
=INPUT)
FILES> shaded = sample
Valid parameters are:
TOL1:[0] - Lower DN tolerance to be used to compute averages.
TOL2:[maxdn] - High DN tolerance to use to compute averages.
19
PC-MIPS User Manual
ISS:[1] - Starting sample to start processing.
Output lines will still contain all samples.
NORM:[ave] - DN value to be used to normalize all the averages.
Default is average of averages.
(e.g., TOL1=1,TOL2=250,ISS=17,NORM=100)
PARAM> tol1=5, tol2=250, norm=100
FILES>
Do you want to display shaded (y/n)? n
STRTCH
The STRTCH program performs contrast stretching on images.
The user can specify up to ten stretch intervals. A stretch
interval is specified by four values. These four values are
given in terms of DN values. They are IN_LOW, IN_HIGH, OUT_1,
and OUT_2. IN_LOW and IN_HIGH represent an input interval.
OUT_1 and OUT_2 represent the corresponding output interval.
Input DN values are assigned to values in the output
interval based on their position within the input interval. If
IN_LOW is equal to IN_HIGH, input DN values of IN_LOW are
assigned the value of OUT_1. IN_HIGH cannot be less than IN_LOW.
Input DN values not within any of the specified input intervals
are unchanged.
If OUT_1 is equal to OUT_2, all DN values in the input
interval are reassigned a value of OUT_1. If OUT_2 is less
than OUT_1, an 'inverse' stretch is performed (i.e., increasing
input DN values are reassigned to decreasing output DN values).
Note:
STRTCH differs from the MIPS STRETC program which uses
stretch 'pairs' instead of stretch 'intervals' to specify the
stretch operation.
Example:
STRETC 09-NOV-88 # of files
bit types: 8 1 input
max samples: 3000 1 output
File name where the processed results will be stored.
(e.g., OUTPUT.EXT
File name that has the input data to be processed.
=INPUT.EXT)
FILES> result = image
Enter number of stretch intervals: 4
Enter IN_LOW, IN_HIGH, OUT_1, OUT_2 for interval 1:
0, 15, 0, 0
Enter IN_LOW, IN_HIGH, OUT_1, OUT_2 for interval 2:
16, 71, 0, 127
Enter IN_LOW, IN_HIGH, OUT_1, OUT_2 for interval 3:
72, 127, 128, 255
20
PC-MIPS User Manual
Enter IN_LOW, IN_HIGH, OUT_1, OUT_2 for interval 4:
128, 255, 255, 255
FILES>
Do you want to display result (y/n)? n
SUBIMG
The sub-image program is used to extract a user-specified
sub-image. This program is similar to the MIPS DK2DK program.
Additionally, the output image may be 'flipped' (or 'reversed')
in the line and/or sample directions.
The user is prompted for an input file name. After the
input file name is specified, the number of lines and samples in
the input file are displayed and the user is prompted for
starting/ending line and sample numbers. The output file is
'flipped' by specifying an ending value less than the starting
value. Finally, the user is prompted for an output file name.
Example:
SUBIMG (10/88) allows the extraction and/or "flipping" of sub-
images. The dimensions of the sub-image are entered by the user.
"flipping" is accomplished by indicating starting values greater
than ending values.
Enter input file name: study
study contains 1112 lines and 984 samples
Enter starting and ending line numbers: 1, 420
Enter starting and ending sample numbers: 981, 400
Enter output file name: sub_stdy
Enter input file name:
WTCMBO
This program is used to generate an output image which is
the weighted sum (i.e., a linear combination) of up to four input
images. The output is calculated using the following formula:
Y = C1*X1 + C2*X2 + C3*X3 + C4*X4 +C5
where
Y is the output image,
C1-C5 are user-specified constants, and
X1-X4 are user-specified input images.
The computation is done using 16-bit arithmetic.
Example:
WTCMBO 04-JUN-84 # of files
bit types: 8 1 - 4 input
max samples: 3000 1 output
21
PC-MIPS User Manual
File name where the processed results will be stored.
(e.g., OUTPUT
File name(s) that has (have) the input data to be processed.
=INPUT1,INPUT2,INPUT3)
FILES> sum = sample, shade
Valid parameters are:
CON1:[.25] - Weighting coefficient for input file 1.
CON2:[.25] - Weighting coefficient for input file 2.
CON3:[.25] - Weighting coefficient for input file 3.
CON4:[.25] - Weighting coefficient for input file 4.
CON5:[0] - Add-back constant for output file. Used to center
the results in 8-bit positive range.
(e.g., CON1=1.0,CON2=-1.0,CON3=.5,CON5=100)
PARAM> con1=0.75, con2=1.25, con5 = -127
FILES>
Do you want to display sum (y/n)? n
22